<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:forEach items="${orders}" var="order">
	<div id="o${order.id}">
		<div class="wsmj1">
			<p>
				<fmt:formatDate value="${ order.createdAt }" pattern="yyyy-MM-dd HH:mm:ss" />
			</p>
			<span>状态:${order.state>=30?'已支付':orderState[order.state]}</span>
		</div>
		<c:set var="sum" value="0"></c:set>
		<c:forEach items="${order.storageOrder}" var="storageOrder">
			<div id="s${storageOrder.id}">
				<div class="wsmj2">
					<span>${storageOrder.storage.name}</span>
					<span>状态:${orderState[storageOrder.state]}</span>
				</div>
				<c:forEach items="${storageOrder.goodsOrder}" var="goodsOrder">
					<c:set var="sum" value="${sum+goodsOrder.num}"></c:set>
					<div id="g${goodsOrder.id}">
						<div class="wsmj3">
							<table width="946" border="0" class="table2">
								<tr>
									<td style="width: 100px;" class="td2">
										<table>
											<tr>
												<td>
													<!-- <img src="${goodsOrder.image }" /> --> <img src="${staticPath}/pcimages/secret.png" />
												</td>
											</tr>
										</table>
									</td>
									<td style="width: 326px; text-align: left; padding-left: 10px; padding-right: 10px; text-align: left;" class="td2">
										<table>
											<tr style="height: 100px;">
												<td>
													<!--<a >${goodsOrder.name}</a>
													<p>${goodsOrder.goodsSku.specName}</p> --> <a>******</a>
													<p>**</p>
												</td>
											</tr>
										</table>
									</td>
									<td style="width: 100px; text-align: center;" class="td2">
										<table style="width: 100%;">
											<tr style="height: 100px;">
												<td>￥ <fmt:formatNumber value="${goodsOrder.price/100}" pattern="#,###.##" />
												</td>
											</tr>
										</table>
									</td>
									<td style="width: 100px; text-align: center;" class="td2">
										<table style="width: 100%;">
											<tr style="height: 100px;">
												<td>${goodsOrder.num}</td>
											</tr>
										</table>
									</td>
									<td style="width: 100px; text-align: center;" class="td2">
										<table style="width: 100%;">
											<tr style="height: 100px;">
												<td><c:if test="${goodsOrder.points>=0}">
										￥
										<fmt:formatNumber value="${goodsOrder.price/100}" pattern="#,###.##" />
													</c:if> <c:if test="${goodsOrder.points<0}">
										积分${-goodsOrder.points}
										</c:if></td>
											</tr>
										</table>
									</td>
									<td style="width: 100px;" class="td2">
										<p>状态:${orderState[goodsOrder.state]}</p>
									</td>
									<td style="width: 100px; border: none;" class="td2"></td>
								</tr>
							</table>
						</div>
					</div>
				</c:forEach>
			</div>
		</c:forEach>
		<div class="wsmj4">
			<h2>
				商品金额：￥
				<fmt:formatNumber value="${order.goodsAmount/100}" pattern="#,###.##" />
				&nbsp;&nbsp;&nbsp;优惠金额：-￥
				<fmt:formatNumber value="${order.discountAmount/100}" pattern="#,###.##" />
				&nbsp;&nbsp;&nbsp;运费：￥
				<fmt:formatNumber value="${order.freightAmount/100}" pattern="#,###.##" />
				&nbsp;&nbsp;&nbsp;总金额：￥
				<fmt:formatNumber value="${order.resultAmount/100}" pattern="#,###.##" />
			</h2>
		</div>
	</div>

</c:forEach>
<input type="hidden" id="pageCount" value="${count}" />
